package com.example.localareanetworkchat.persistence.database

import androidx.room.Database
import androidx.room.RoomDatabase
import com.example.localareanetworkchat.persistence.dao.ChatGroupDao
import com.example.localareanetworkchat.persistence.dao.ChatGroupUserDao
import com.example.localareanetworkchat.persistence.dao.ChatMessageDao
import com.example.localareanetworkchat.persistence.dao.UserDao
import com.example.localareanetworkchat.persistence.entity.ChatGroup
import com.example.localareanetworkchat.persistence.entity.ChatGroupUser
import com.example.localareanetworkchat.persistence.entity.ChatMessage
import com.example.localareanetworkchat.persistence.entity.User

@Database(entities = [User::class, ChatGroup::class, ChatGroupUser::class, ChatMessage::class], version = 1, exportSchema = false)
abstract class ChatDatabase: RoomDatabase() {

    abstract fun userDao(): UserDao
    abstract fun chatGroupDao(): ChatGroupDao
    abstract fun chatGroupUserDao(): ChatGroupUserDao
    abstract fun chatMessageDao(): ChatMessageDao

}